<template>
  <div class="search-two">
    <van-search v-model="searchValue" input-align="center" shape="round" placeholder="请输入搜索关键词" @search="search" />
    <span class="iconfont iconshaixuan"></span>
  </div>
</template>

<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
import { Search } from "vant";

@Component({
  name: "SearchTwo",
  components: {
    VanSearch: Search
  }
})
export default class SearchTwo extends Vue {
  private searchValue = "";

  private search(event: any) {
    this.$emit("search", event);
  }
}
</script>

<style lang="less" scoped>
.search-two {
  background-color: white;
  display: flex;
  align-items: center;
  .iconshaixuan {
    padding: 10px 10px 10px 0px;
    font-size: 22px;
    color: #bfbfbf;
  }
  .van-search {
    flex: 1;
  }
  /deep/.van-icon-search {
    color: #cccccc;
  }
}
</style>
